\(\int \frac {\sec (c+d x) \tan ^3(c+d x)}{a+a \sin (c+d x)} \, dx\) [824]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 27, antiderivative size = 55 \[ \int \frac {\sec (c+d x) \tan ^3(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\sec ^3(c+d x)}{3 a d}+\frac {\sec ^5(c+d x)}{5 a d}-\frac {\tan ^5(c+d x)}{5 a d} \]

[Out]

-1/3*sec(d*x+c)^3/a/d+1/5*sec(d*x+c)^5/a/d-1/5*tan(d*x+c)^5/a/d

Rubi [A] (verified)

Time = 0.11 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {2918, 2686, 14, 2687, 30} \[ \int \frac {\sec (c+d x) \tan ^3(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\tan ^5(c+d x)}{5 a d}+\frac {\sec ^5(c+d x)}{5 a d}-\frac {\sec ^3(c+d x)}{3 a d} \]

[In]

Int[(Sec[c + d*x]*Tan[c + d*x]^3)/(a + a*Sin[c + d*x]),x]

[Out]

-1/3*Sec[c + d*x]^3/(a*d) + Sec[c + d*x]^5/(5*a*d) - Tan[c + d*x]^5/(5*a*d)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2686

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2687

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2918

Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.))/((a_) + (b_.)*sin[(e_.) + (f_
.)*(x_)]), x_Symbol] :> Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Dist[g^2/(b*d),
Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2
 - b^2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\int \sec ^3(c+d x) \tan ^3(c+d x) \, dx}{a}-\frac {\int \sec ^2(c+d x) \tan ^4(c+d x) \, dx}{a} \\ & = -\frac {\text {Subst}\left (\int x^4 \, dx,x,\tan (c+d x)\right )}{a d}+\frac {\text {Subst}\left (\int x^2 \left (-1+x^2\right ) \, dx,x,\sec (c+d x)\right )}{a d} \\ & = -\frac {\tan ^5(c+d x)}{5 a d}+\frac {\text {Subst}\left (\int \left (-x^2+x^4\right ) \, dx,x,\sec (c+d x)\right )}{a d} \\ & = -\frac {\sec ^3(c+d x)}{3 a d}+\frac {\sec ^5(c+d x)}{5 a d}-\frac {\tan ^5(c+d x)}{5 a d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.70 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.93 \[ \int \frac {\sec (c+d x) \tan ^3(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\sec ^3(c+d x) (40+66 \cos (c+d x)-192 \cos (2 (c+d x))+22 \cos (3 (c+d x))+24 \cos (4 (c+d x))+16 \sin (c+d x)+22 \sin (2 (c+d x))-48 \sin (3 (c+d x))+11 \sin (4 (c+d x)))}{960 a d (1+\sin (c+d x))} \]

[In]

Integrate[(Sec[c + d*x]*Tan[c + d*x]^3)/(a + a*Sin[c + d*x]),x]

[Out]

(Sec[c + d*x]^3*(40 + 66*Cos[c + d*x] - 192*Cos[2*(c + d*x)] + 22*Cos[3*(c + d*x)] + 24*Cos[4*(c + d*x)] + 16*
Sin[c + d*x] + 22*Sin[2*(c + d*x)] - 48*Sin[3*(c + d*x)] + 11*Sin[4*(c + d*x)]))/(960*a*d*(1 + Sin[c + d*x]))

Maple [A] (verified)

Time = 0.28 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.58

method result size
parallelrisch \(\frac {\frac {4}{15}-4 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {8 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}-\frac {8 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15}+\frac {8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{15}}{d a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}\) \(87\)
risch \(-\frac {2 i \left (8 i {\mathrm e}^{3 i \left (d x +c \right )}+9 \,{\mathrm e}^{2 i \left (d x +c \right )}+6 i {\mathrm e}^{i \left (d x +c \right )}-5 \,{\mathrm e}^{4 i \left (d x +c \right )}-3+10 i {\mathrm e}^{5 i \left (d x +c \right )}+15 \,{\mathrm e}^{6 i \left (d x +c \right )}\right )}{15 \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{5} \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{3} d a}\) \(109\)
norman \(\frac {-\frac {4 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}+\frac {4}{15 a d}+\frac {8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{15 d a}-\frac {8 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15 d a}-\frac {8 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 d a}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}\) \(111\)
derivativedivides \(\frac {-\frac {1}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {16}{128 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-128}+\frac {2}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {2}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d a}\) \(115\)
default \(\frac {-\frac {1}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {16}{128 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-128}+\frac {2}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {2}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d a}\) \(115\)

[In]

int(sec(d*x+c)^4*sin(d*x+c)^3/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

4/15*(1-15*tan(1/2*d*x+1/2*c)^4-6*tan(1/2*d*x+1/2*c)^3-2*tan(1/2*d*x+1/2*c)^2+2*tan(1/2*d*x+1/2*c))/d/a/(tan(1
/2*d*x+1/2*c)-1)^3/(tan(1/2*d*x+1/2*c)+1)^5

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.36 \[ \int \frac {\sec (c+d x) \tan ^3(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {3 \, \cos \left (d x + c\right )^{4} - 9 \, \cos \left (d x + c\right )^{2} - {\left (3 \, \cos \left (d x + c\right )^{2} - 1\right )} \sin \left (d x + c\right ) + 4}{15 \, {\left (a d \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) + a d \cos \left (d x + c\right )^{3}\right )}} \]

[In]

integrate(sec(d*x+c)^4*sin(d*x+c)^3/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/15*(3*cos(d*x + c)^4 - 9*cos(d*x + c)^2 - (3*cos(d*x + c)^2 - 1)*sin(d*x + c) + 4)/(a*d*cos(d*x + c)^3*sin(d
*x + c) + a*d*cos(d*x + c)^3)

Sympy [F(-1)]

Timed out. \[ \int \frac {\sec (c+d x) \tan ^3(c+d x)}{a+a \sin (c+d x)} \, dx=\text {Timed out} \]

[In]

integrate(sec(d*x+c)**4*sin(d*x+c)**3/(a+a*sin(d*x+c)),x)

[Out]

Timed out

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 234 vs. \(2 (49) = 98\).

Time = 0.22 (sec) , antiderivative size = 234, normalized size of antiderivative = 4.25 \[ \int \frac {\sec (c+d x) \tan ^3(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {4 \, {\left (\frac {2 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {2 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {6 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {15 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + 1\right )}}{15 \, {\left (a + \frac {2 \, a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {2 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {6 \, a \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {6 \, a \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {2 \, a \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {2 \, a \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {a \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}\right )} d} \]

[In]

integrate(sec(d*x+c)^4*sin(d*x+c)^3/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

-4/15*(2*sin(d*x + c)/(cos(d*x + c) + 1) - 2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 6*sin(d*x + c)^3/(cos(d*x +
 c) + 1)^3 - 15*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 + 1)/((a + 2*a*sin(d*x + c)/(cos(d*x + c) + 1) - 2*a*sin(d
*x + c)^2/(cos(d*x + c) + 1)^2 - 6*a*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 6*a*sin(d*x + c)^5/(cos(d*x + c) +
1)^5 + 2*a*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 - 2*a*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 - a*sin(d*x + c)^8/(c
os(d*x + c) + 1)^8)*d)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 120 vs. \(2 (49) = 98\).

Time = 0.32 (sec) , antiderivative size = 120, normalized size of antiderivative = 2.18 \[ \int \frac {\sec (c+d x) \tan ^3(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\frac {5 \, {\left (3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5\right )}}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{3}} - \frac {15 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 60 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 10 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 20 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 7}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{5}}}{120 \, d} \]

[In]

integrate(sec(d*x+c)^4*sin(d*x+c)^3/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

1/120*(5*(3*tan(1/2*d*x + 1/2*c)^2 - 12*tan(1/2*d*x + 1/2*c) + 5)/(a*(tan(1/2*d*x + 1/2*c) - 1)^3) - (15*tan(1
/2*d*x + 1/2*c)^4 + 60*tan(1/2*d*x + 1/2*c)^3 + 10*tan(1/2*d*x + 1/2*c)^2 + 20*tan(1/2*d*x + 1/2*c) + 7)/(a*(t
an(1/2*d*x + 1/2*c) + 1)^5))/d

Mupad [B] (verification not implemented)

Time = 10.54 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.56 \[ \int \frac {\sec (c+d x) \tan ^3(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {4\,\left (15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}{15\,a\,d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}^3\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}^5} \]

[In]

int(sin(c + d*x)^3/(cos(c + d*x)^4*(a + a*sin(c + d*x))),x)

[Out]

-(4*(2*tan(c/2 + (d*x)/2)^2 - 2*tan(c/2 + (d*x)/2) + 6*tan(c/2 + (d*x)/2)^3 + 15*tan(c/2 + (d*x)/2)^4 - 1))/(1
5*a*d*(tan(c/2 + (d*x)/2) - 1)^3*(tan(c/2 + (d*x)/2) + 1)^5)